package com.xlf.common.core.constant;

public class ArticleConstants {

    /**
     * 访问量统计
     */
    public static final String ARTICLE_VIEW = "article:view:";

    /**
     * 点赞的用户set
     */
    public static final String ARTICLE_THUMBS = "article:thumbs:";

    /**
     * 评论数统计
     */
    public static final String ARTICLE_COMMENT_NUM = "article:comment:num:";

    /**
     * 用户收藏set
     */
    public static final String USER_ARTICLE_COLLECTION = "user:article:collection:";


    /**
     * 获取article的用户点赞SetKey  value:set<String>
     * @param articleId articleId
     * @return
     */
    public static String  getTopicThumbsSetKey(String articleId){
        return ARTICLE_THUMBS + articleId;
    }

    /**
     * 获取article的评论数Key
     * @param articleId articleId
     * @return
     */
    public static String  getTopicDiscussNumKey(String articleId){
        return ARTICLE_COMMENT_NUM + articleId;
    }

    /**
     * 获取用户收藏的articleSet
     * @param useId
     * @return
     */
    public static String  getUserTopicCollection(String useId){
        return USER_ARTICLE_COLLECTION + useId;
    }




}
